﻿App.Controllers.Words = Backbone.Controller.extend({
    routes: {
        "": "index"
    },

    index: function () {
        var words = new App.Collections.Words();
        words.url = function() { return ListUrl; };
        words.fetch({
            success: function () {
                new App.Views.Index({ collection: words });
            },
            error: function () {
                new Error({ message: "Error loading Words." });
            }
        });
    }
});